#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

int main()
{
  printf("I am a process! pid:%d ppid:%d\n",getpid(),getppid());
  //char* const env[]={"SHUJU=zbw","WZ=hhhhhhhhhhhhhh",NULL};
  extern char** environ;
  int i=0;
  for(i=0;environ[i];i++)
  {
    printf("env[%d]:%s\n",i,environ[i]);
  }
  printf("\n");
  printf("putenv begin ...\n");
  putenv("SHUJU=xxxxxxxxxxxxxxxxxxxxxxx");
  for(i=0;environ[i];i++)
  {
    printf("env[%d]:%s\n",i,environ[i]);
  }
  printf("modify environment varible begin:SHUJU\n");
  putenv("SHUJU=#######################");
  for(i=0;environ[i];i++)
  {
    printf("env[%d]:%s\n",i,environ[i]);
  }
  return 0;
}

